// 日历图表配置信息
export const calendarChartOption = {
  title: {
    top: 30,
    left: 'center',
    text: '',
    show: false
  },
  tooltip: {},
  visualMap: {
    min: 0,
    max: 10000,
    type: 'piecewise',
    orient: 'horizontal',
    left: 'center',
    top: 65
  },
  calendar: {
    top: 120,
    left: 30,
    right: 30,
    cellSize: ['auto', 13],
    // 需要动态设置
    range: '',
    itemStyle: {
      borderWidth: 0.5
    },
    yearLabel: { show: false },
    dayLabel: {
      show: true,
      firstDay: 1,
      nameMap: 'cn',
      margin: 10,
      color: '#000000'
    },
    monthLabel: {
      show: true,
      firstDay: 1,
      nameMap: 'cn',
      margin: 5,
      color: '#000000'
    }
  },
  series: {
    type: 'heatmap',
    coordinateSystem: 'calendar',
    // 需要动态设置
    data: []
  }
}

// 散点图配置
export const scatterDiagramOption = {
  tooltip: {
    position: 'top'
  },
  title: [],
  singleAxis: [],
  series: []
}

// Burnout chart 燃尽图
export const burnoutChartOption = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: []
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [],
      type: 'line',
      areaStyle: {}
    }
  ]
}

// Funnel chart 漏斗图
export const funnelChartOption = {

  tooltip: {
    trigger: 'item',
    formatter: '{a} <br/>{b} : {c}%'
  },
  toolbox: {
    feature: {
      dataView: { readOnly: false, show: false },
      restore: { show: false },
      saveAsImage: { show: false }
    }
  },
  legend: {
    data: []
  },
  series: [
    {
      name: '升级车辆阶段分布 ',
      type: 'funnel',
      left: '10%',
      top: 60,
      bottom: 60,
      width: '80%',
      min: 0,
      max: 100,
      minSize: '0%',
      maxSize: '100%',
      sort: 'descending',
      gap: 2,
      label: {
        show: true,
        position: 'inside'
      },
      labelLine: {
        length: 10,
        lineStyle: {
          width: 1,
          type: 'solid'
        }
      },
      itemStyle: {
        borderColor: '#fff',
        borderWidth: 1
      },
      emphasis: {
        label: {
          fontSize: 20
        }
      },
      data: []
    }
  ]
}

// Pie chart 饼图
export const pieChartOption = {
  tooltip: {
    trigger: 'item'
  },
  legend: {
    top: '95%',
    left: 'center'
  },
  series: [
    {
      name: '升级车辆失败原因',
      type: 'pie',
      radius: ['40%', '70%'],
      avoidLabelOverlap: false,
      label: {
        show: false,
        position: 'center'
      },
      emphasis: {
        label: {
          show: true,
          fontSize: '40',
          fontWeight: 'bold'
        }
      },
      labelLine: {
        show: false
      },
      data: []
    }
  ]
}
